<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/vue.js"></script>
</head>

<body>

    <div id="root">
        <h1>插值语法</h1>
        <h3>你好,{{name}}</h3>
        <hr>
        <h1>指令语法</h1>
        <div>vue指令:v-bind:属性="js表达式" 引号中的不是字符串,而是js表达式</div>
        <br>
        <div>v-bind指令可以用在标签内的任意属性, 简写为 { :属性 }</div>
        <a v-bind:href="school.url" :x="hello.toUpperCase()">{{school.name}}</a>
    </div>

    <script>
        Vue.config.productionTip = false;

        new Vue({
            el: "#root",
            data: {
                name: "jack",
                school: {
                    name: "百度",
                    url: "https://www.baidu.com",
                },
                hello: "hello!"
            }
        })
    </script>
</body>

</html>